package com.qf.test;

import com.qf.pjo.User;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author 10537
 * @version V1.0
 * @Date 2021/9/27 15:33
 */

public class Demo2 {
    @Test
    public void inThe(){
        ApplicationContext ac=new ClassPathXmlApplicationContext("classpath:applicationContext.xml");

        //获取FactoryBean生产的对象
        Object map = ac.getBean("map");
        System.out.println(map);

        //获取FactoryBean本身
        Object bean = ac.getBean("&map");
        System.out.println(bean);
    }

}
